package com.nets.client;


import com.nets.packet.Packet;
import com.nets.packet.PacketType;
import com.nets.pool.ClientPool;

/**
 * @author sig
 * @since 2016/9/17
 */
public class ClientLauncher {

    public ClientLauncher(String host, int port) {
        Client client = ClientPool.create(host, port);

        Packet req = new Packet(PacketType.sendIP);

        if (null != client) try {
            client.send(req);
        } catch (Exception e) {
            client.shutdown();
            e.printStackTrace();
        }
    }
}
